//
// Created by baixin on 2025/8/20.
//
#include "iostream"

using namespace std;


// 定义一个结构体
struct StudentInfo {
    string name;
    int age;
    double score;
} stu3, stu4 = {"张", 21, 32.9};

void printInfo(StudentInfo stu) {
    cout << "姓名:" << stu.name << "\t" << "年龄：" << stu.age << endl;

}

int main() {
    StudentInfo stu1 = {"张s", 21, 32.9};
    StudentInfo stu2{"张", 21, 32.9};
    stu3 = stu1;
    //printInfo(stu1);


    StudentInfo s[3] = {
            {"张1", 21, 32.9},
            {"张2", 22, 32.9},
            {"张3", 23, 32.9}
    };
    //printInfo(s[1]);

    for (StudentInfo stu: s) {
        printInfo(stu);
    }
    return 0;
}
